
<%@ page import="br.com.rise.leilao.Leilao"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<g:set var="entityName"
	value="${message(code: 'leilao.label', default: 'Leilao')}" />
<title><g:message code="default.list.label" args="[entityName]" />
</title>
</head>
<body>
	<div class="nav">
		<span class="menuButton"><a class="home"
			href="${createLink(uri: '/')}"><g:message
					code="default.home.label" />
		</a>
		</span> <span class="menuButton"><g:link class="create"
				action="create">
				<g:message code="default.new.label" args="[entityName]" />
			</g:link>
		</span>
	</div>
	<div class="body">
		<h1>
			<g:message code="default.list.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<div class="list">
			<table>
				<thead>
					<tr>

						<g:sortableColumn property="id"
							title="${message(code: 'leilao.id.label', default: 'Id')}" />

						<g:sortableColumn property="produto"
							title="${message(code: 'leilao.produto.label', default: 'Produto')}" />

						<g:sortableColumn property="dataInicio"
							title="${message(code: 'leilao.dataInicio.label', default: 'Data Inicio')}" />

						<g:sortableColumn property="dataTermino"
							title="${message(code: 'leilao.dataTermino.label', default: 'Data Termino')}" />

						<g:sortableColumn property="valorInicial"
							title="${message(code: 'leilao.valorInicial.label', default: 'Valor Inicial')}" />

						<g:sortableColumn property="valorFinal"
							title="${message(code: 'leilao.valorFinal.label', default: 'Valor Final')}" />

					</tr>
				</thead>
				<tbody>
					<g:each in="${leilaoInstanceList}" status="i" var="leilaoInstance">
						<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

							<td><g:link action="show" id="${leilaoInstance.id}">
									${fieldValue(bean: leilaoInstance, field: "id")}
								</g:link>
							</td>

							<td>
								${fieldValue(bean: leilaoInstance, field: "produto")}
							</td>

							<td><g:formatDate format="dd/MM/yyyy"
									date="${leilaoInstance.dataInicio}" />
							</td>

							<td><g:formatDate format="dd/MM/yyyy"
									date="${leilaoInstance.dataTermino}" />
							</td>

							<td>
								${fieldValue(bean: leilaoInstance, field: "valorInicial")}
							</td>

							<td>
								${fieldValue(bean: leilaoInstance, field: "valorFinal")}
							</td>

						</tr>
					</g:each>
				</tbody>
			</table>
		</div>
		<div class="paginateButtons">
			<g:paginate total="${leilaoInstanceTotal}" />
		</div>
	</div>
</body>
</html>
